function getData()
{
  $cidStr = '';
  if(isset($_REQUEST['cid']) && $_REQUEST['cid'] != ''){
    $cidStr = "AND kategoria = {$_REQUEST['cid']}";
  }
  
  $query  = "SELECT COUNT(*) FROM News WHERE aktywna = 1 $cidStr";
  
  if(!$result = $this->dbo->query($query)){
    $this->setMessage('Lista wiadomoci nie jest dostpna.');
    return 0;
  }
  
  if(!$row = $result->fetch_row()){
    $this->setMessage('Lista wiadomoci nie jest dostpna.');
    return 0;
  }  
  return $row[0];
}